package com.centaline.androidsalesblog.api.usercenter;

import com.android.volley.Request;
import com.centaline.androidsalesblog.api.UserCenterApi;
import com.centaline.androidsalesblog.constants.AppConstant;
import com.centaline.androidsalesblog.model.responseobject.UserRo;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 注册
 * Created by Lihq on 2016/1/13.
 */
public class RegisterApi extends UserCenterApi<UserRo> {

    private String phone;
    private String password;

    public RegisterApi(Class<?> tag, Class<UserRo> aClass, IResponseListener<UserRo> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public int getMethod() {
        return Request.Method.POST;
    }

    @Override
    public void setParams() {
        putParams("Phone", phone);
        putParams("PassWord", password);
        putParams("AppName", "APP");
        putStringParams("CityCode", AppConstant.CityCode);
        putStringParams("RegisteIP", AppConstant.IP);
    }


    @Override
    public String getPath() {
        return "InsertUserInfo2Request";
    }
}

